<h1 class="page_title">Listing questions</h1>

<table>
  <tr>
    <th>Question</th>
    <th>Description</th>
    <th>Answer 1</th>
    <th>Answer 2</th>
    <th>Answer 3</th>
    <th>Answer 4</th>
    <th>Answer 5</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @questions.each do |question| %>
  <tr>
    <td><%= question.question %></td>
    <td><%= question.description %></td>
    <td><%= question.answer_1 %></td>
    <td><%= question.answer_2 %></td>
    <td><%= question.answer_3 %></td>
    <td><%= question.answer_4 %></td>
    <td><%= question.answer_5 %></td>
    <td><%= link_to 'Show', [@questionnaire, question] %></td>
    <td><%= link_to 'Edit', [@questionnaire, question] %></td>
    <td><%= link_to 'Destroy', [@questionnaire, question], :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Question', new_questionnaire_question_path(@questionnaire)%>
<%= link_to 'Back', questionnaires_path%>
